package com.lianzhihui.romeex.ui.me;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.lianzhihui.romeex.R;
import com.lianzhihui.romeex.net.APIConstant;
import com.lianzhihui.romeex.ui.base.BaseActivity;
import com.lianzhihui.romeex.ui.base.CustomWebActivity;
import com.lianzhihui.romeex.utils.NoDoubleClickUtils;
import com.lianzhihui.romeex.utils.StatusBarUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @ProjectName: romeex
 * @Package: com.lianzhihui.romeex.ui.me
 * @ClassName: AboutUsActivity
 * @Description: java类作用描述
 * @Author: zhanghong
 * @CreateDate: 2020/11/2 16:36
 * @UpdateUser: 更新者：
 * @UpdateDate: 2020/11/2 16:36
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class AboutUsActivity extends BaseActivity {


    @BindView(R.id.include_top_iv_back)
    ImageView includeTopIvBack;
    @BindView(R.id.include_top_lin_newback)
    LinearLayout includeTopLinNewback;
    @BindView(R.id.include_top_tv_title)
    TextView includeTopTvTitle;
    @BindView(R.id.include_top_iv_right_second)
    ImageView includeTopIvRightSecond;
    @BindView(R.id.include_top_tv_right)
    TextView includeTopTvRight;
    @BindView(R.id.include_top_lin_right)
    LinearLayout includeTopLinRight;
    @BindView(R.id.include_top_lin_background)
    LinearLayout includeTopLinBackground;
    @BindView(R.id.app_top_bar)
    LinearLayout appTopBar;
    @BindView(R.id.privacy_layout)
    RelativeLayout privacyLayout;
    @BindView(R.id.protocol_layout)
    RelativeLayout protocolLayout;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_about_us;
    }

    @Override
    protected void initView() {
        StatusBarUtil.setTransparent(this);
        StatusBarUtil.setStatusBarTextColor(this, false);
        includeTopTvTitle.setText(getResources().getText(R.string.text_about_us));
    }

    @Override
    public boolean setFitSystemWindowFlag() {
        return false;
    }

    @Override
    protected void initData() {

    }


    @OnClick({R.id.include_top_iv_back, R.id.privacy_layout, R.id.protocol_layout})
    public void OnClick(View v) {
        if (NoDoubleClickUtils.isDoubleClick()) {
            switch (v.getId()) {

                case R.id.include_top_iv_back:
                    finish();
                    break;
                case R.id.privacy_layout:
                    Intent intent = new Intent(this, CustomWebActivity.class);
                    intent.putExtra("url", APIConstant.H5_privacyAgreement);
                    intent.putExtra("title", getResources().getString(R.string.text_privacy_policy));
                    intent.putExtra("isHideTitle", false);
                    startActivity(intent);
                    break;
                case R.id.protocol_layout:
                    Intent intent1 = new Intent(this, CustomWebActivity.class);
                    intent1.putExtra("url", APIConstant.H5_userAgreement);
                    intent1.putExtra("title", getResources().getString(R.string.text_user_agreement));
                    intent1.putExtra("isHideTitle", false);
                    startActivity(intent1);
                    break;

                default:
                    break;
            }
        }
    }


}
